4d9b86ba88fc53c5f0c933f737edf7be2e204561,Java_CCN/com/parc/ccn/library/io/CCNInputStream.java,CCNInputStream,readInternal,#number[]#number#number#,146

Before Change


			offset += readCount;
			lenToRead -= readCount;
			lenRead += readCount;
			Library.logger().info("     read " + readCount + " bytes for " + lenRead + " total, " + lenToRead + " remaining.");
			
		}
		return lenRead;

After Change


			}
			int readCount = ((_currentBlock.content().length - _blockOffset) > lenToRead) ? lenToRead : (_currentBlock.content().length - _blockOffset);
			if (null != buf) {} // use for skip
				Library.logger().finest("before arraycopy: content length "+_currentBlock.content().length+" _blockOffset "+_blockOffset+" dst length "+buf.length+" dst index "+offset+" len to copy "+readCount);
				System.arraycopy(_currentBlock.content(), _blockOffset, buf, offset, readCount);
			
			_blockOffset += readCount;
			offset += readCount;
			lenToRead -= readCount;
			lenRead += readCount;
			Library.logger().finest("     read " + readCount + " bytes for " + lenRead + " total, " + lenToRead + " remaining.");
			
		}
		return lenRead;